Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events API Send-RSVP support #175

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

yifanplanet
Copy link
Contributor

  • Events API Send-RSVP support

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Copy link
Contributor

@mrashed-dev mrashed-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments. Also if you can rename the files to match the casing of the class (i.e. instead of SendRSVPQueryParams it should be SendRsvpQueryParams). Thanks!

Comment on lines 5 to 16
/**
* Enum representing the allowed RSVP status values.
*/
enum class RsvpStatus(val value: String) {
YES("yes"),
NO("no"),
MAYBE("maybe");

override fun toString(): String {
return value
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to its own file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

* @return The send-rsvp response
*/
@Throws(NylasApiError::class, NylasSdkTimeoutError::class)
fun sendRsvp(identifier: String, requestBody: SendRsvpRequest, queryParams: SendRsvpQueryParams): Response<Event> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the response type should be a model that represents a send rsvp response. According to the docs it should be an object like:

{
    request_id: string
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yifanplanet
Copy link
Contributor Author

@mrashed-dev Thanks for the review! The changes are made based on the request.

The DeleteResponse could be named into something more generic in the future.

Copy link
Contributor

@mrashed-dev mrashed-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Thank you @yifanplanet !

@mrashed-dev mrashed-dev merged commit cbf26c7 into v2.0.0-beta Dec 18, 2023
1 check passed
@mrashed-dev mrashed-dev deleted the AV-2763-3-0-kotlin-send-rsvp-support branch December 18, 2023 21:13
mrashed-dev added a commit that referenced this pull request Dec 18, 2023
# Changelog

### Added
* Added support for event send RSVP (#175)

### Changed
* Fixed int type being serialized to double sometimes (#177)
* Fixed `Auth.exchangeCodeForToken` always returning 401 (#178)
* Fixed error when sending message or updating draft (#179)

# License
<!-- Your PR comment must contain the following line for us to merge the
PR. -->
I confirm that this contribution is made under the terms of the MIT
license and that I have the authority necessary to make this
contribution on behalf of its copyright owner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants